package com.lx.ngsl.exam.analysis.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lx.ngsl.exam.analysis.service.AnalysisService;
import com.lx.ngsl.util.ResultSetUtil;

@RestController
@RequestMapping("/v0")
public class AnalysisController {

	
	@Autowired
	private AnalysisService service;
	/*
	 * 查询统计信息
	 */
	@RequestMapping("/analysis")
	public Map<String, List<String>> getTjData() {
		
		List<Map<String, Object>> data = service.getTjData();
		//提取前台展示的数据
		Map<String, List<String>> extractData = ResultSetUtil.extractData(data, "tag","count","num","wrong");
		
		return extractData;
	}
	
	
	
}
